﻿@using SCMS.Resource
@model SCMS.UI.Models.RequestReviewModel
@{
    int numReview = 0;
    int procReview = 0;
    int approvalORs = 0;
    int inventory = 0;
    int finReview = 0;
    int totalNotif = 0;
    string notifClass = "";
    string notifTitle = "";
    string notifValue = "";
    procReview += Model.OrderRequests != null ? Model.OrderRequests.Count : 0;
    procReview += Model.TenderAnalyses != null ? Model.TenderAnalyses.Count : 0;
    procReview += Model.PurchaseOrders != null ? Model.PurchaseOrders.Count : 0;
    procReview += Model.ProcurementPlans != null ? Model.ProcurementPlans.Count : 0;
    procReview += Model.CompletionCertificates != null ? Model.CompletionCertificates.Count : 0;
    approvalORs += Model.ApprovalOrderRequests != null ? Model.ApprovalOrderRequests.Count : 0;

    finReview += Model.PaymentRequests != null ? Model.PaymentRequests.Count : 0;
    finReview += Model.AdvanceRequests != null ? Model.AdvanceRequests.Count : 0;
    finReview += Model.ExpenseClaims != null ? Model.ExpenseClaims.Count : 0;
    finReview += Model.SalaryPayments != null ? Model.SalaryPayments.Count : 0;
    finReview += Model.TravelAuthorizations != null ? Model.TravelAuthorizations.Count : 0;

    inventory += Model.WarehouseReleases != null ? Model.WarehouseReleases.Count : 0;
    inventory += Model.GoodsReceivedNotes != null ? Model.GoodsReceivedNotes.Count : 0;    
    
    numReview = procReview + finReview + inventory + approvalORs;

    int numAuth = 0;
    int procAuth = 0;
    int finAuth = 0;
    procAuth += Model.AuthOrderRequests != null ? Model.AuthOrderRequests.Count : 0;
    procAuth += Model.AuthTenderAnalyses != null ? Model.AuthTenderAnalyses.Count : 0;
    procAuth += Model.AuthPurchaseOrders != null ? Model.AuthPurchaseOrders.Count : 0;

    finAuth += Model.AuthPaymentRequests != null ? Model.AuthPaymentRequests.Count : 0;
    finAuth += Model.AuthAdvanceRequests != null ? Model.AuthAdvanceRequests.Count : 0;
    finAuth += Model.AuthExpenseClaims != null ? Model.AuthExpenseClaims.Count : 0;
    finAuth += Model.AuthSalaryPayments != null ? Model.AuthSalaryPayments.Count : 0;
    finAuth += Model.AuthTravelAuthorizations != null ? Model.AuthTravelAuthorizations.Count : 0;

    numAuth = procAuth + finAuth;

    totalNotif = numReview + numAuth;
    if (totalNotif > 1)
    {
        notifClass = "notification noti-yellow";
        notifTitle = string.Format(Resources.RequestReview_String_MoreThanOneNotification, totalNotif);
        notifValue = totalNotif.ToString();
    }
    else if(totalNotif == 1)
    {
        notifClass = "notification noti-yellow";
        notifTitle = string.Format(Resources.RequestReview_String_OneNotification, totalNotif);
        notifValue = totalNotif.ToString();
    }
    else
    {
        notifClass = "notification noti-blue";
        notifTitle = Resources.RequestReview_String_NoNotification;
        notifValue = "!";
    }
    
}
<div style="width:auto;">                    
    <dl class="dropdown" style="">
        <dt>
            <span id="linkglobal" class="@notifClass">@notifValue</span>
        </dt>
        <dd>
            <div id="noti-accordion">
                <!-- Auth RFA -->
                @if (Model.AuthAdvanceRequests != null && Model.AuthAdvanceRequests.Count > 0)
                {
                    <h3><a>@Resources.Request4Advance_ViewRADetails_AuthorizeRFA (@Model.AuthAdvanceRequests.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var rfa in Model.AuthAdvanceRequests)
                            { 
                                <li>
                                    @Ajax.ActionLink(rfa.RefNumber, "../RequestReview/", new { id = "LoadRFAForAuth" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_AuthorizeRequestForAdvance, rfa.RefNumber),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadRFAForAuth/" + rfa.Id),
                                        OnSuccess = "CenterPopupRFP"
                                    }, new { @class = "reviewLink" }) 
                                </li>
                            }
                        </ul>
                    </div>
                } 

                <!-- Auth RFP -->
                @if (Model.AuthPaymentRequests != null && Model.AuthPaymentRequests.Count > 0)
                {
                    <h3><a>@Resources.Request4Payment_String_AuthorizeRFP (@Model.AuthPaymentRequests.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var rfp in Model.AuthPaymentRequests)
                        { 
                            <li>
                                @Ajax.ActionLink(rfp.EntityPaymentRqst.RefNumber, "../RequestReview/", new { id = "LoadRFPForAuth" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_AuthorizeRequestForPayment, rfp.EntityPaymentRqst.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/LoadRFPForAuth/" + rfp.EntityPaymentRqst.Id),
                                    OnSuccess = "CenterPopupRFP"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                } 

                <!-- Auth ECF -->
                @if (Model.AuthExpenseClaims != null && Model.AuthExpenseClaims.Count > 0)
                {
                    <h3><a>@Resources.RequestReview_String_AuthorizeECF (@Model.AuthExpenseClaims.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var ecf in Model.AuthExpenseClaims)
                        { 
                            <li>
                                @Ajax.ActionLink(ecf.EntityExpseRqst.RefNumber, "../RequestReview/", new { id = "LoadECFForAuth" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_AuthorizeExpenseClaimForm, ecf.EntityExpseRqst.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/LoadECFForAuth/" + ecf.EntityExpseRqst.Id),
                                    OnSuccess = "CenterPopupECF"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                } 

                <!-- Auth SPM -->
                @if (Model.AuthSalaryPayments != null && Model.AuthSalaryPayments.Count > 0)
                {
                    <h3><a>@Resources_frank.RequestReview_String_AuthorizeSPM (@Model.AuthSalaryPayments.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var spm in Model.AuthSalaryPayments)
                        { 
                            <li>
                                @Ajax.ActionLink(spm.EntitySalaryP.RefNumber, "../RequestReview/", new { id = "LoadSPMForAuth" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.SalaryPayment_String_AuthorizeSalaryPayment, spm.EntitySalaryP.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/LoadSPMForAuth/" + spm.EntitySalaryP.Id),
                                    OnSuccess = "CenterPopupSPM"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                } 

                <!-- Auth TAF -->
                @if (Model.AuthTravelAuthorizations != null && Model.AuthTravelAuthorizations.Count > 0)
                {
                    <h3><a>@Resources.RequestReview_String_AuthorizeTAF (@Model.AuthTravelAuthorizations.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var taf in Model.AuthTravelAuthorizations)
                        { 
                            <li>
                                @Ajax.ActionLink(taf.TAuthFormEntity.RefNumber, "../RequestReview/", new { id = "LoadTAFForAuth" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_AuthorizeTravelAuthorizationForm, taf.TAuthFormEntity.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/LoadTAFForAuth/" + taf.TAuthFormEntity.Id),
                                    OnSuccess = "CenterPopup();calculateMBValue();"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                } 

                <!-- Auth OR -->
                @if (Model.AuthOrderRequests != null && Model.AuthOrderRequests.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_AuthorizeOR (@Model.AuthOrderRequests.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var or in Model.AuthOrderRequests)
                            { 
                                <li>
                                    @Ajax.ActionLink(or.ORRefNo, "../RequestReview/", new { id = "LoadOrderRequestForAuth" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.OrderRequest_String_AuthorizeOrderRequest, or.ORRefNo),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadOrderRequestForAuth/" + or.ORID),
                                        OnSuccess = "CenterPopupOR"
                                    }, new { @class = "reviewLink" }) 
                                </li>
                            }
                        </ul>
                    </div>
                }
                  
                <!-- Auth TA -->
                @if (Model.AuthTenderAnalyses != null && Model.AuthTenderAnalyses.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_AuthorizeTA (@Model.AuthTenderAnalyses.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var ta in Model.AuthTenderAnalyses)
                            {
                                <li>
                                    @Ajax.ActionLink(ta.EntityTenderAnalysis.RefNumber, "../RequestReview/", new { id = "LoadTAForAuth" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_AuthorizeTenderAnalysis, ta.EntityTenderAnalysis.RefNumber),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadTAForAuth/" + ta.EntityTenderAnalysis.Id),
                                        OnSuccess = "CenterPopup"
                                    }, new { @class = "reviewLink" }) 
                                </li>
                            }
                        </ul>
                    </div>
                }                                   
                 
                <!-- Auth PO -->
                @if (Model.AuthPurchaseOrders != null && Model.AuthPurchaseOrders.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_AuthorizePO (@Model.AuthPurchaseOrders.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var po in Model.AuthPurchaseOrders)
                            {
                                <li>
                                    @Ajax.ActionLink(po.POEntiy.RefNumber, "../RequestReview/", new { id = "LoadPurchaseOrderForAuth" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.PurchaseOrder_String_AuthorizePurchaseOrder, po.POEntiy.RefNumber ),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadPurchaseOrderForAuth/" + po.POEntiy.Id),
                                        OnSuccess = "CenterPopupPO"
                                    }, new { @class = "reviewLink" }) 
                                </li>
                            }
                        </ul>
                    </div>
                } 

                <!-- Review RFA -->
                @if (Model.AdvanceRequests != null && Model.AdvanceRequests.Count > 0)
                {
                    <h3><a>@Resources.Request4Advance_ViewRADetails_ReviewRFA (@Model.AdvanceRequests.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var rfa in Model.AdvanceRequests)
                        { 
                            <li>
                                @Ajax.ActionLink(rfa.RefNumber, "../RequestReview/", new { id = "ReviewRFA" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ReviewRequestForAdvance, rfa.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/ReviewRFA/" + rfa.Id),
                                    OnSuccess = "CenterPopupRFP"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                } 

                <!-- Review RFP -->      
                @if (Model.PaymentRequests != null && Model.PaymentRequests.Count > 0)
                {
                    <h3><a href="#">@Resources.Request4Payment_String_ReviewRFP (@Model.PaymentRequests.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var rfp in Model.PaymentRequests)
                            { 
                                <li>
                                    @Ajax.ActionLink(rfp.EntityPaymentRqst.RefNumber, "../RequestReview/", new { id = "ReviewRFP" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ReviewRequestForPayment, rfp.EntityPaymentRqst.RefNumber),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/ReviewRFP/" + rfp.EntityPaymentRqst.Id),
                                        OnSuccess = "CenterPopupRFP"
                                    }, new { @class = "reviewLink" }) 
                                </li>
                            }
                        </ul>
                    </div>
                }           
                
                <!-- Review ECF -->
                @if (Model.ExpenseClaims != null && Model.ExpenseClaims.Count > 0)
                {
                    <h3><a>@Resources.RequestReview_String_ReviewECF (@Model.ExpenseClaims.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var ecf in Model.ExpenseClaims)
                        { 
                            <li>
                                @Ajax.ActionLink(ecf.EntityExpseRqst.RefNumber, "../RequestReview/", new { id = "ReviewECF" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ReviewExpenseClaimForm, ecf.EntityExpseRqst.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/ReviewECF/" + ecf.EntityExpseRqst.Id),
                                    OnSuccess = "CenterPopupECF"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                } 

                <!-- Review SPM -->
                @if (Model.SalaryPayments != null && Model.SalaryPayments.Count > 0)
                {
                    <h3><a>@Resources.RequestReview_String_ReviewSPM (@Model.SalaryPayments.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var spm in Model.SalaryPayments)
                        { 
                            <li>
                                @Ajax.ActionLink(spm.EntitySalaryP.RefNumber, "../RequestReview/", new { id = "ReviewSPM" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ReviewSalaryPayment, spm.EntitySalaryP.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/ReviewSPM/" + spm.EntitySalaryP.Id),
                                    OnSuccess = "CenterPopupSPM"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                }  
                
                <!-- Review TAF -->
                @if (Model.TravelAuthorizations != null && Model.TravelAuthorizations.Count > 0)
                {
                    <h3><a>@Resources.RequestReview_String_ReviewTAF (@Model.TravelAuthorizations.Count)</a></h3>
                    <div>
                    <ul>
                        @foreach (var taf in Model.TravelAuthorizations)
                        { 
                            <li>
                                @Ajax.ActionLink(taf.TAuthFormEntity.RefNumber, "../RequestReview/", new { id = "ReviewTAF" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ReviewTravelAuthorizationForm, taf.TAuthFormEntity.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/ReviewTAF/" + taf.TAuthFormEntity.Id),
                                    OnSuccess = "CenterPopup();calculateMBValue();"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                    </ul>
                    </div>
                }             
                                
                <!-- Review OR -->
                @if (Model.OrderRequests != null && Model.OrderRequests.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_ReviewOR (@Model.OrderRequests.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var or in Model.OrderRequests)
                            { 
                                <li>
                                    @Ajax.ActionLink(or.ORRefNo, "../RequestReview/", new { id = "LoadOrderRequest" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.OrderRequest_String_ReviewOrderRequest, or.ORRefNo),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadOrderRequest/" + or.ORID),
                                        OnSuccess = "CenterPopupOR"
                                    }) 
                                </li>
                            }   
                        </ul>
                    </div>
                }
                
                <!-- Approve OR -->
                @if (Model.ApprovalOrderRequests != null && Model.ApprovalOrderRequests.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_ApproveOR (@Model.ApprovalOrderRequests.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var or in Model.ApprovalOrderRequests)
                            { 
                                <li>
                                    @Ajax.ActionLink(or.ORRefNo, "../RequestReview/", new { id = "LoadOrderRequest" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.OrderRequest_String_ApproveOrderRequest, or.ORRefNo),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/LoadOrderRequestForApproval/" + or.ORID),
                                        OnSuccess = "CenterPopupOR"
                                    }) 
                                </li>
                            }   
                        </ul>
                    </div>
                }
                
                <!-- Evaluate TA -->
                @if (Model.TenderAnalyses != null && Model.TenderAnalyses.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_EvaluateTA (@Model.TenderAnalyses.Count)</a></h3>
                    <div>
                        <ul>
                            @foreach (var ta in Model.TenderAnalyses)
                            {
                                <li>
                                    @Ajax.ActionLink(ta.EntityTenderAnalysis.RefNumber, "../RequestReview/", new { id = "ReviewTA" }, new AjaxOptions
                                    {
                                        OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_EvaluateTenderAnalysis, ta.EntityTenderAnalysis.RefNumber),
                                        UpdateTargetId = "popup-page",
                                        LoadingElementId = "popup-loading",
                                        Url = Url.Action("../RequestReview/ReviewTA/" + ta.EntityTenderAnalysis.Id),
                                        OnSuccess = "CenterPopup"
                                    }, new { @class = "reviewLink" }) 
                                </li>
                            }
                        </ul>
                    </div>
                }    

                <!-- Review PO -->
                @if (Model.PurchaseOrders != null && Model.PurchaseOrders.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_ReviewPO (@Model.PurchaseOrders.Count)</a></h3>
                    <div>
                        <ul>
                        @foreach (var po in Model.PurchaseOrders)
                        {
                            <li>
                                @Ajax.ActionLink(po.POEntiy.RefNumber, "../RequestReview/", new { id = "LoadPurchaseOrder" }, new AjaxOptions
                            {
                                OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.PurchaseOrder_String_ReviewPurchaseOrder, po.POEntiy.RefNumber),
                                UpdateTargetId = "popup-page",
                                LoadingElementId = "popup-loading",
                                Url = Url.Action("../RequestReview/LoadPurchaseOrder/" + po.POEntiy.Id),
                                OnSuccess = "CenterPopupPO"
                            }, new { @class = "reviewLink" }) 
                            </li>
                        }
                        </ul>
                    </div>
                }    
                     
                <!-- Approve WRO -->
                @if (Model.WarehouseReleases != null && Model.WarehouseReleases.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_ApproveWRO (@Model.WarehouseReleases.Count)</a></h3>
                    <div>
                        <ul>
                        @foreach (var wrn in Model.WarehouseReleases)
                        {
                            <li>
                                @Ajax.ActionLink(wrn.EntityWHouseRelease.RefNumber, "../RequestReview/", new { id = "LoadWRO" }, new AjaxOptions
                            {
                                OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ApproveWarehouseReleaseOrder, wrn.EntityWHouseRelease.RefNumber),
                                UpdateTargetId = "popup-page",
                                LoadingElementId = "popup-loading",
                                Url = Url.Action("../RequestReview/LoadWRO/" + wrn.EntityWHouseRelease.Id),
                                OnSuccess = "CenterPopup"
                            }, new { @class = "reviewLink" }) 
                            </li>
                        }
                        </ul>
                    </div>
                }    

                <!-- Approve GRN -->
                @if (Model.GoodsReceivedNotes != null && Model.GoodsReceivedNotes.Count > 0)
                {
                    <h3><a href="#">@Resources.GoodsReceivedNote_ViewGRNDetails_VerifyGRN (@Model.GoodsReceivedNotes.Count)</a></h3>
                    <div>
                        <ul>
                        @foreach (var grn in Model.GoodsReceivedNotes)
                        {
                            <li>
                                @Ajax.ActionLink(grn.EntityGRN.RefNumber, "../GoodsReceivedNote/", new { id = "VerifyGRN" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_VerifyGoodsReceivedNote, grn.EntityGRN.RefNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../GoodsReceivedNote/VerifyGRN/" + grn.EntityGRN.Id.ToString()),
                                    OnSuccess = "CenterPopup"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                        </ul>
                    </div>
                }    

                <!-- Approve PP -->
                @if (Model.ProcurementPlans != null && Model.ProcurementPlans.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_ApprovePP (@Model.ProcurementPlans.Count)</a></h3>
                    <div>
                        <ul>
                        @foreach (var pp in Model.ProcurementPlans)
                        {
                            <li>
                                @Ajax.ActionLink(pp.EntityPP.ProjectDonor.ProjectNumber, "../RequestReview/", new { id = "ApprovePP" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogueOR('{0}: {1}')", Resources.RequestReview_String_ApproveProcurementPlan, pp.EntityPP.ProjectDonor.ProjectNumber),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/ApprovePP/" + pp.EntityPP.Id.ToString()),
                                    OnSuccess = "CenterPopup"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                        </ul>
                    </div>
                }    

                <!-- Approve CC -->
                @if (Model.CompletionCertificates != null && Model.CompletionCertificates.Count > 0)
                {
                    <h3><a href="#">@Resources.RequestReview_String_ApproveCC (@Model.CompletionCertificates.Count)</a></h3>
                    <div>
                        <ul>
                        @foreach (var cc in Model.CompletionCertificates)
                        {
                            <li>
                                @Ajax.ActionLink(cc.EntityCC.RefNumber, "../RequestReview/", new { id = "LoadCCForApproval" }, new AjaxOptions
                                {
                                    OnBegin = string.Format("ShowDialogue('{0}: " + cc.EntityCC.RefNumber + "')", Resources.RequestReview_ProcurementRequestLinks_ApproveCC),
                                    UpdateTargetId = "popup-page",
                                    LoadingElementId = "popup-loading",
                                    Url = Url.Action("../RequestReview/LoadCCForApproval/" + cc.EntityCC.Id.ToString()),
                                    OnSuccess = "CenterPopup"
                                }, new { @class = "reviewLink" }) 
                            </li>
                        }
                        </ul>
                    </div>
                }    
            </div>
        </dd>
    </dl>
</div>